package com.qf.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;

@Controller
@RequestMapping("/test")
public class TestController {

    @RequestMapping("/xx")
    public ModelAndView tt(){
        System.out.println("访问了");
        ModelAndView modelAndView = new ModelAndView();

        modelAndView.addObject("hello", "武爷好坑");
        modelAndView.setViewName("/hello");
        return modelAndView;
    }
    @RequestMapping("/test2") //访问路径
    public String hello2(){
        System.out.println("hello c9");
        return "hello";//  跳转:/jsp/hello.jsp
    }


}
